package battleship.data;

import java.io.IOException;

import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerException;

import org.xml.sax.SAXException;

import battleship.PluginBackground;

public class Save implements  PluginBackground
{
	SaveXML saver;
	SaveLoader loader;
	public Save() throws ParserConfigurationException, IOException, SAXException
	{
		this.saver = new SaveXML();
		this.loader = new SaveLoader();
	}
	
	@Override
	public void backGroundAction() {
		saver.update();
		try {
			saver.transform();
		} catch (TransformerException e) {
			
			System.err.println("de savefile kon niet opgeslagen worden");
		}
		
	}
}